package com.bukebianjihe.exercise;

/**
 * @Author milian
 * @Date 2021/7/28 0028 15:22
 */
public class test {
    public static void main(String[] args) {
        int sumResult = getSumResult(1,2,3,4,5,6,7,8);
        System.out.println(sumResult);
    }

    private static int getSumResult(int...arr) {
        int sum=0;
        for (int i = 0; i <arr.length ; i++) {
            sum+=arr[i];
        }
        return sum;
    }
}
